package com.gitee.neuray.security.admin.authority;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @author: zhhongyu
 * @description: 权限菜单
 * @since: Create in 14:49 2020/3/20
 */
@Data
@Setter
@Getter
public class AdminMenuDto {
    private String id;
    private String parentId;
    /**
     * 菜单唯一标识
     */
    private String name;
    /**
     * 菜单基本属性
     */
    private AdminMetaDto meta;
    /**
     * 角色下菜单所携带的按钮
     */
    private List<AdminElementsDto> elements;
    /**
     * 菜单是否被勾选
     */
    private boolean checkout;

    /**
     *儿子的children
     */
    private List<AdminMenuDto> children = new ArrayList<>();

    public void add(AdminMenuDto node){
        children.add(node);
    }
}
